package day0718;

import java.util.Scanner;

public class Test6 {
    public static void main(String[] args) {
        String question="有言在先寸土不让（打一字）";
        System.out.println(question);


        String inputAnswer ="";
        Scanner s=new Scanner(System.in);
        do{
            inputAnswer=s.nextLine();

            if(inputAnswer.equals("诗")){
                System.out.println("恭喜你，猜对了");
                break;//结束循环
            }else{
                System.out.println("猜错了，请继续猜");
            }

        }while(true);




        /*do{
            System.out.println("请输入您猜的答案：");
            inputAnswer=s.nextLine();
        }while( !inputAnswer.equals("诗") );


        System.out.println("恭喜你，猜对了");*/
    }
}
